\hypertarget{motherboard_2init_8c}{
\section{motherboard/init.c File Reference}
\label{motherboard_2init_8c}\index{motherboard/init.c@{motherboard/init.c}}
}
Initialization routines for the motherboard.  


{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$avr/io.h$>$}\par
{\tt \#include $<$avr/interrupt.h$>$}\par
{\tt \#include \char`\"{}usart.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{motherboard_2init_8c_6ce37a080cbe4df58e0938309e4eb207}{
\#define \hyperlink{motherboard_2init_8c_6ce37a080cbe4df58e0938309e4eb207}{OCR0\_\-1MS}~14}
\label{motherboard_2init_8c_6ce37a080cbe4df58e0938309e4eb207}

\begin{CompactList}\small\item\em Used for timer compare to match 1 ms. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{motherboard_2init_8c_d9b40dee04f1b7ced79b74fe3f6cb7fd}{init\_\-usart} (void)
\begin{CompactList}\small\item\em Initializes the USART for the communication bus. \item\end{CompactList}\item 
void \hyperlink{motherboard_2init_8c_64c88f8f419036c766c3b881335d75f4}{init\_\-timer\_\-0} (void)
\item 
void \hyperlink{motherboard_2init_8c_41959d20756307f8b73709871cc2bf47}{init\_\-ports} (void)
\begin{CompactList}\small\item\em Set the direction of the ports. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Initialization routines for the motherboard. 

\begin{Desc}
\item[Author:]Mikael Larsmark, SM2WMV \end{Desc}
\begin{Desc}
\item[Date:]2010-01-25 

\begin{Code}\begin{verbatim} #include "init.h" 
\end{verbatim}
\end{Code}

 \end{Desc}


Definition in file \hyperlink{motherboard_2init_8c-source}{init.c}.

\subsection{Function Documentation}
\hypertarget{motherboard_2init_8c_41959d20756307f8b73709871cc2bf47}{
\index{motherboard/init.c@{motherboard/init.c}!init\_\-ports@{init\_\-ports}}
\index{init\_\-ports@{init\_\-ports}!motherboard/init.c@{motherboard/init.c}}
\subsubsection[{init\_\-ports}]{\setlength{\rightskip}{0pt plus 5cm}void init\_\-ports (void)}}
\label{motherboard_2init_8c_41959d20756307f8b73709871cc2bf47}


Set the direction of the ports. 

Set the direction of the ports

Set the direction of the ports 

Definition at line 54 of file init.c.\hypertarget{motherboard_2init_8c_64c88f8f419036c766c3b881335d75f4}{
\index{motherboard/init.c@{motherboard/init.c}!init\_\-timer\_\-0@{init\_\-timer\_\-0}}
\index{init\_\-timer\_\-0@{init\_\-timer\_\-0}!motherboard/init.c@{motherboard/init.c}}
\subsubsection[{init\_\-timer\_\-0}]{\setlength{\rightskip}{0pt plus 5cm}void init\_\-timer\_\-0 (void)}}
\label{motherboard_2init_8c_64c88f8f419036c766c3b881335d75f4}


Initialize timer0 to use the main crystal clock and the output compare interrupt feature to generate an interrupt approximately once per millisecond to use as a general purpose time base. 

Definition at line 43 of file init.c.

References OCR0\_\-1MS.\hypertarget{motherboard_2init_8c_d9b40dee04f1b7ced79b74fe3f6cb7fd}{
\index{motherboard/init.c@{motherboard/init.c}!init\_\-usart@{init\_\-usart}}
\index{init\_\-usart@{init\_\-usart}!motherboard/init.c@{motherboard/init.c}}
\subsubsection[{init\_\-usart}]{\setlength{\rightskip}{0pt plus 5cm}void init\_\-usart (void)}}
\label{motherboard_2init_8c_d9b40dee04f1b7ced79b74fe3f6cb7fd}


Initializes the USART for the communication bus. 

Initializes the USART for the communication bus 

Definition at line 32 of file init.c.

References usart0\_\-init(), usart0\_\-receive\_\-loopback(), and usart0\_\-transmit().